package com.ibeetl.cms.web;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

/**
 * 接口测试
 */
@Controller
@Slf4j
public class TestController {

    private static final String MODEL = "/test";

    private Integer num = 0;

    @GetMapping(MODEL + "/getUser")
    @ResponseBody
    public Integer index() {
        num++;
        System.out.println("num:" + num);
        return num;
    }

    @GetMapping(MODEL + "/")
    public ModelAndView copy() {
        ModelAndView view = new ModelAndView("/copy1.html") ;
        return view;
    }

}
